<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="org.vo.User,org.dao.*,org.factory.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户页面</title>
<style>
div {
	margin: 8px;
}

#container {
	width: 250px;
	height: auto;
	margin: 20px auto;
}

div input {
	width: 150px;
	float: right;
}
</style>
</head>
<body>
	<%
		User user = (User) session.getAttribute("user");
		if (null == user) {
			response.sendRedirect("login.jsp");
		} else {
	%>
	<form action="update.jsp" method="post">
		<div id="container">
			<div>
				ID<input type="text" name="aid"readOnly="ture" value="<%=user.getId()%>">
			</div>
			<div>
				姓名 <input type="text" name="bname" value="<%=user.getName()%>">
			</div>
			<div>
				性别<input type="text" name="csex" value="<%=user.getSex()%>">
			</div>
			<div>
				年龄 <input type="text" name="dage" value="<%=user.getAge()%>">
			</div>
			<div>
				邮箱 <input type="text" name="email" value="<%=user.getMail()%>">
			</div>
			<div>
				密码 <input type="text" name="fpasswd" value="<%=user.getPasswd()%>">
			</div>
			<div>
				注册时间<input type="text" name="gdate" readOnly="ture" value="<%=user.getDate()%>">
			</div>
			<div>
				<input type="submit" value="修改">
			</div>
		</div>
	</form>
	<%
		}
	%>
</body>
</html>